using System;
using System.Collections.Generic;
using System.Text;

namespace SharpMud.MudLib.Common.Entities
{
    public interface ICharacterFilter<TCharacter> : SharpMud.Server.Systems.Security.Entities.IUserRole where TCharacter : ICharacter
    {
        /// <summary>
        /// The method that tests a character for arbritrary criteria and then determines if the character passes the criteria or not
        /// </summary>
        /// <param name="characterToTest">The character to test</param>
        /// <returns>True if the character passes the criteria, otherwise false</returns>
        bool FilterPredicate(TCharacter characterToTest);
    }

    public interface IFuzzyCharacterFilter<TCharacter> where TCharacter : ICharacter
    {
        /// <summary>
        /// The method that tests a character for arbritrary criteria and then determines if the character passes the criteria or not
        /// </summary>
        /// <param name="characterToTest">The character to test</param>
        /// <returns>TriState.True if the character passes the criteria, TriState.False if it clearly does not, and TriState.Default if
        /// it cannot be determined/returns>
        System.TriState FuzzyFilterPredicate(TCharacter characterToTest);
    }

    public interface ICharacterSorter<TCharacter> where TCharacter : ICharacter
    {
        /// <summary>
        /// Compares two characters for purposes of sorting
        /// </summary>
        int CompareCharacters(TCharacter leftCharacter, TCharacter rightCharacter);
    }
}
